import request from '@/utils/request.js'

const loginApi = ({ mobile, code }) => {
  return request({
    url: '/v1_0/authorizations',
    method: 'POST',
    data: {
      mobile,
      code
    },
    isAuth: false
  })
}
const getChannelAPI = () => {
  return request({
    url: '/v1_0/user/channels'
  })
}

// 文章 - 详情
const articleDetailAPI = ({ id }) => {
  return request({
    // :id是后台规定的参数名
    // 前端要在对应路径位置传值(不要写:)
    url: `/v1_0/articles/${id}`
  })
}
export { loginApi }
export { getChannelAPI }
export { articleDetailAPI }
